<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>订单详情页</title>
	<script src='__PUBLIC__/Js/jquery.js'></script>
	<script src="//cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.js"></script>
	<link href="//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet">
	<script src="__PUBLIC__/Js/jqui/jquery-ui.min.js"></script>
	<link rel="stylesheet" href="__PUBLIC__/Js/jqui/jquery-ui.min.css">
	<style>
	body{background:#F3F3F3;}
	*{margin:0;padding:0;font-size:15px;}
	a{cursor:pointer;}
	.morebody{width:90%;border:0px solid #D6D6D6;margin:50px auto;}
	.obody{width:100%;height:50px;background-color:#F1F1F1;border-bottom:solid 1px #D6D6D6;float:left;}
	.ordnum{display:block;border:0px solid black;margin-top:13px;margin-left:10px;float:left;}
	.ordtitle{width:100%;height:30px;background-color:#F1F1F1;border-bottom:solid 1px #D6D6D6;float:left;line-height:30px}
	.pimg{height:80px;border-radius:4px;margin-left: 10px;}
	.s1{display:block}
	table{background-color: white;}
	.foot{border:0px solid black;width:210px;}
	.btn1{background:red;width:100px;height:40px;color:white;font-size:15px;border:0px ;border-radius:4px;}
	.bck{background:gray;width:100px;height:40px;color:white;font-size:15px;border:0px ;border-radius:4px;}
	</style>
</head>
<body>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~固定在头部的导航栏~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
		<div class="navbar-header">
			 <a class="navbar-brand">订单详情</a>
		</div>
	</nav>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~展示的表格~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<div class="morebody">
	<div class="obody"><span class="ordnum"><b>订单号:<{$list.ordnum}></b></span></div>
	<div class="ordtitle">&nbsp;&nbsp;<b>收货人信息</b></div>
	<table width=100% align="center" border=0px>		
		<tr height=30px>
			<td width=33%>&nbsp;&nbsp;姓名:<{$list.ord_name}></td>
			<td width=33%>电话:<{$list.ord_tel}></td>
			<td width=34%>详细地址:<{$list.ord_addr}></td>
		</tr>
	</table>
	<div class="ordtitle">&nbsp;&nbsp;<b>订单信息</b></div>
	<table width=100% align="center" border=0px>		
		<tr height=30px>
			<td width=33%>&nbsp;&nbsp;会员账号:<{$list.user_name}></td>
			<td width=33%>支付类型:余额支付</td>
			<td width=34%>下单时间:<{$list.ordtime|date="Y-m-d H:i:s",###}></td>
		</tr>
		<tr height=30px>
			<td></td>
			<td></td>
			<td>
				<if condition="$list.comtime !='' ">
					结单时间:<{$list.comtime|date="Y-m-d H:i:s",###}>
				<else />
					结单时间:尚未结单
				</if>
			</td>
		</tr>
	</table>
	<div class="ordtitle">&nbsp;&nbsp;<b>商品详情</b></div>
	<table width=100% align="center" class="table table-hover">
		<tr height=30px  >
			<th width=40%>商品信息</th>
			<th width=15%>样式</th>
			<th width=15%>单价</th>
			<th width=15%>购买数量</th>			
			<th width=15%>评论状态</th>
		</tr>		
		<foreach name='plist' item='v'>	
		<tr height=100px>
			<td>
				<img src="__ROOT__/Uploads/prod/<{$v.goods_pic}>" alt="图片" class="pimg">
				<span><{$v.goods_name}></span>
			</td>
			<td>
				<span class="s1"><{$v.color}></span>
				<span class="s1"><{$v.mobtype}></span>
				<span class="s1"><{$v.memory}></span>
			</td>
			<td>&yen;<{$v.goods_price}></td>
			<td><{$v.num}></td>
			<td>
				<switch name="v.comment">
				    <case value="0">未评价</case>
				    <case value="1">已评价</case>
				    <default />
				</switch>
			</td>
			
		</tr>
		</foreach>
	</table>
	<div class="foot">
		<if condition="$list.effect == 2 ">			
			<input type="button" class='bck' value="返回">
			<input type="button" class="btn1" value="确认发货">
		<else />
			<input type="button" class='bck' value="返回">	
		</if>				
	</div>
</div>
<input type="hidden" class="order_id" value='<{$list.oid}>'>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~js代码部分~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<script>
$(document).on('click','.btn1',function(){
	var ordid=$('.order_id').val();
	$( "<div>确认发货吗???</div>" ).dialog({
			title:'发货状态',
			modal: true,
			buttons: {
		        确定: function(){
		          	$.post('<{:U("ordsend")}>',{ordid:ordid},function(data){
console.log('aaaaaaaaa');
						if(data.status){
							alert('修改成功');				
							$('.btn1').remove();							
						}else{
							alert('修改失败');
						}			
					},'json');
		          	$(this).dialog( "close" );
		        },
		        取消: function(){
		        	$(this).dialog( "close" );
		        }
			}
		});
});
$(document).on('click','.bck',function(){
	location.href="<{:U('Admin/Order/index')}>";
});

</script>

</body>
</html>